Integrand size = 19, antiderivative size = 48 \[ \int \csc (c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {2 a^2 \log (1-\cos (c+d x))}{d}-\frac {2 a^2 \log (\cos (c+d x))}{d}+\frac {a^2 \sec (c+d x)}{d} \]
[Out]
Time = 0.14 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {3957, 2915, 12, 78} \[ \int \csc (c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^2 \sec (c+d x)}{d}+\frac {2 a^2 \log (1-\cos (c+d x))}{d}-\frac {2 a^2 \log (\cos (c+d x))}{d} \]
[In]
[Out]
Rule 12
Rule 78
Rule 2915
Rule 3957
Rubi steps \begin{align*} \text {integral}& = \int (-a-a \cos (c+d x))^2 \csc (c+d x) \sec ^2(c+d x) \, dx \\ & = \frac {a \text {Subst}\left (\int \frac {a^2 (-a+x)}{(-a-x) x^2} \, dx,x,-a \cos (c+d x)\right )}{d} \\ & = \frac {a^3 \text {Subst}\left (\int \frac {-a+x}{(-a-x) x^2} \, dx,x,-a \cos (c+d x)\right )}{d} \\ & = \frac {a^3 \text {Subst}\left (\int \left (\frac {1}{x^2}-\frac {2}{a x}+\frac {2}{a (a+x)}\right ) \, dx,x,-a \cos (c+d x)\right )}{d} \\ & = \frac {2 a^2 \log (1-\cos (c+d x))}{d}-\frac {2 a^2 \log (\cos (c+d x))}{d}+\frac {a^2 \sec (c+d x)}{d} \\ \end{align*}
Time = 0.13 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.75 \[ \int \csc (c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^2 \left (-2 \log (\cos (c+d x))+4 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+\sec (c+d x)\right )}{d} \]
[In]
[Out]
Time = 0.45 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.40
method | result | size |
derivativedivides | \(\frac {a^{2} \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )\right )+2 a^{2} \ln \left (\tan \left (d x +c \right )\right )+a^{2} \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{d}\) | \(67\) |
default | \(\frac {a^{2} \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )\right )+2 a^{2} \ln \left (\tan \left (d x +c \right )\right )+a^{2} \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{d}\) | \(67\) |
risch | \(\frac {2 a^{2} {\mathrm e}^{i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {4 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {2 a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(72\) |
parallelrisch | \(\frac {a^{2} \left (4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (d x +c \right )-2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \cos \left (d x +c \right )-2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \cos \left (d x +c \right )+\cos \left (d x +c \right )+1\right )}{d \cos \left (d x +c \right )}\) | \(82\) |
norman | \(-\frac {2 a^{2}}{d \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}+\frac {4 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(83\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.27 \[ \int \csc (c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {2 \, a^{2} \cos \left (d x + c\right ) \log \left (-\cos \left (d x + c\right )\right ) - 2 \, a^{2} \cos \left (d x + c\right ) \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - a^{2}}{d \cos \left (d x + c\right )} \]
[In]
[Out]
\[ \int \csc (c+d x) (a+a \sec (c+d x))^2 \, dx=a^{2} \left (\int 2 \csc {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \csc {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \csc {\left (c + d x \right )}\, dx\right ) \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.90 \[ \int \csc (c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {2 \, a^{2} \log \left (\cos \left (d x + c\right ) - 1\right ) - 2 \, a^{2} \log \left (\cos \left (d x + c\right )\right ) + \frac {a^{2}}{\cos \left (d x + c\right )}}{d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 115 vs. \(2 (48) = 96\).
Time = 0.31 (sec) , antiderivative size = 115, normalized size of antiderivative = 2.40 \[ \int \csc (c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {2 \, {\left (a^{2} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - a^{2} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) + \frac {2 \, a^{2} + \frac {a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}}{\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1}\right )}}{d} \]
[In]
[Out]
Time = 14.25 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.73 \[ \int \csc (c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^2}{d\,\cos \left (c+d\,x\right )}-\frac {4\,a^2\,\mathrm {atanh}\left (2\,\cos \left (c+d\,x\right )-1\right )}{d} \]
[In]
[Out]